﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Xml.Serialization;
using AddIn.EA.Architecture.CatalogService.BusinessEntity.Enum;

namespace AddIn.EA.Architecture.CatalogService.BusinessEntity
{
    public abstract class MemberBase
    {
        private string _name;

        [XmlIgnore]
        public PrefixName MemberPrefix { get; protected set; }

        [XmlAttribute("name")]
        public String Name 
        {
            get { return MemberPrefix.ToString() + ":" + _name; }
            set { _name = value.Replace(MemberPrefix.ToString() + ":", string.Empty); } 
        }
        
        [XmlAttribute("projectGUID")]
        public string ProjectGUID { get; set; }

        [XmlElement("summary")]
        public String Summary { get; set; }
    }
}
